// 导入变量和混合宏
@use 'variables' as *;
@use 'mixins' as *;

// 全局重置样式
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: $font-family;
  font-size: $font-size-base;
  line-height: 1.5;
  color: $text-primary;
  background-color: $background-color;
}

// 滚动条样式
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
  
  &:hover {
    background: #a8a8a8;
  }
}

// 链接样式
a {
  color: inherit;
  text-decoration: none;
  
  &:hover {
    color: $primary-color;
  }
}

// 按钮样式重置
button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  
  &:focus {
    outline: none;
  }
}

// 输入框样式重置
input, textarea {
  border: none;
  outline: none;
  font-family: inherit;
  
  &::placeholder {
    color: $text-secondary;
  }
}

// 图片样式
img {
  max-width: 100%;
  height: auto;
}

// 列表样式重置
ul, ol {
  list-style: none;
}

// 表格样式重置
table {
  border-collapse: collapse;
  border-spacing: 0;
}

// 表单元素样式
.el-button {
  @include button-primary;
}

.el-input {
  @include input-style;
}

.el-textarea {
  @include input-style;
}

// 卡片样式
.card {
  @include card;
}

// 响应式工具类
.mobile-only {
  @include mobile {
    display: block;
  }
  
  @include tablet {
    display: none;
  }
  
  @include desktop {
    display: none;
  }
}

.desktop-only {
  @include mobile {
    display: none;
  }
  
  @include tablet {
    display: none;
  }
  
  @include desktop {
    display: block;
  }
}

// 文本工具类
.text-primary {
  color: $primary-color;
}

.text-secondary {
  color: $text-secondary;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

// 间距工具类
.mt-sm { margin-top: $spacing-sm; }
.mt-md { margin-top: $spacing-md; }
.mt-lg { margin-top: $spacing-lg; }
.mt-xl { margin-top: $spacing-xl; }

.mb-sm { margin-bottom: $spacing-sm; }
.mb-md { margin-bottom: $spacing-md; }
.mb-lg { margin-bottom: $spacing-lg; }
.mb-xl { margin-bottom: $spacing-xl; }

.pt-sm { padding-top: $spacing-sm; }
.pt-md { padding-top: $spacing-md; }
.pt-lg { padding-top: $spacing-lg; }
.pt-xl { padding-top: $spacing-xl; }

.pb-sm { padding-bottom: $spacing-sm; }
.pb-md { padding-bottom: $spacing-md; }
.pb-lg { padding-bottom: $spacing-lg; }
.pb-xl { padding-bottom: $spacing-xl; }